public class FuncVargs {
    static int n = 1;

    static public void test(char ch, double d, int ... args) {
        System.out.printf("function test %d: ", n++);
        for (int i = 0; i < args.length; ++i) {
            System.out.printf("%d ", args[i]);
        }
        System.out.println();
    }

    static public void main(String [] args) {
        test('A', 3567.571);
        test('B', 35778.89, 1);
        test('C', 123678.456, 1, 2);
    }
}
